package com.ln.lnzw.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ln.lnzw.R;
import com.ln.lnzw.bean.NewImplementationSubjectBean;
import com.ln.lnzw.bean.ServiceObjectBean;

import java.util.List;

/**
 * Created by wuwei on 2018/4/24.
 * 自然人适配器
 */

public class ServiceObjectNaturalAdapter extends BaseQuickAdapter<ServiceObjectBean.ResultBean,BaseViewHolder>{
    private ImageView imageView;

    public ServiceObjectNaturalAdapter(int layoutResId, @Nullable List<ServiceObjectBean.ResultBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ServiceObjectBean.ResultBean item) {
        switch (item.getCode()){
            case "005":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.z_005);
                break;
            case "010":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.z_010);
                break;
            case "015":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.z_015);
                break;
            case "020":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.z_020);
                break;
            case "025":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.z_025);
                break;
            case "030":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.z_030);
                break;
            case "035":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.z_035);
                break;
            case "040":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.z_040);
                break;
            case "045":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.z_045);
                break;
            case "050":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.z_050);
                break;
            case "055":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.z_055);
                break;
            case "060":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.z_060);
                break;
            case "065":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.z_065);
                break;
            case "070":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.z_070);
                break;
            case "075":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.z_075);
                break;
            case "085":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.z_085);
                break;
            case "090":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.z_090);
                break;
            case "095":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.z_095);
                break;
            case "100":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.z_100);
                break;
            case "105":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.z_105);
                break;
            case "110":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.z_110);
                break;
            case "115":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.z_115);
                break;
            case "120":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.z_120);
                break;
            case "125":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.z_125);
                break;
            case "130":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.z_130);
                break;
            case "135":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.z_135);
                break;
            case "140":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.z_140);
                break;
            case "145":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.z_145);
                break;
            case "150":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.z_150);
                break;
            case "155":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.z_155);
                break;
            case "999":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.z_999);
                break;
        }
    }
}
